<?php
class UserModel extends CI_Model {


    // 增加用户信息
    public function add(array $data)
    {
        $this->db->insert('user', $data);
    }

    // 检查邮箱和密码信息
    public function check(array $data)
    {
        $array = array( 'email' => $data['email'], 'password' => $data['password'] );
        return $this->db->where( $array )->get( 'user' )->result_array();
    }
}